package com.Set集合;

import com.List集合.demo.Student;

public class HashDemo {
    public static void main(String[] args) {
        Student student = new Student("oo",15);
        Student student2 = new Student("oo",15);

        //重写了hashCode方法 返回是一样的
        //默认情况下 不同对象的hash值是不同的
        System.out.println(student.hashCode());//213064
        System.out.println(student2.hashCode());//213064

        System.out.println("=================");

        System.out.println("hello".hashCode());//99162322
        System.out.println("world".hashCode());//113318802
        System.out.println("world".hashCode());//113318802

        System.out.println("=================");

        System.out.println("重地".hashCode());
        System.out.println("知道".hashCode());

    }
}
